<#include "/common/layout.html">
<@header>
</@header>
<@body>
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <h1>
      <small>系统管理 > 菜单管理</small>
    </h1>
  </section>
  <!-- Main content -->
  <section class="content">
     <div class="row">
      <div class="col-md-12">
        <!-- general form elements -->
        <div class="box box-primary">
          <div class="box-header with-border">
            <h3 class="box-title">编辑菜单</h3>
          </div><!-- /.box-header -->
          <!-- form start -->
          <div class="row">
          	<div class="col-md-6">
        	    <form role="form" data-validator-option="{theme:'bootstrap', timely:2, stopOnError:true}" method="post" action="/system/menu/doEdit.html">
		            <input type="hidden" name="id" value="${(sysMenu.id)!}" />
		            <div class="box-body">
		                 <div class="form-group">
		                    <label>父级菜单</label>
		                    <select name="pid" class="form-control select2" style="width: 100%;" data-rule="父级菜单:required;">
		                      <#list list as m>
		                        <option value="${(m.id)!}" <#if m.id==sysMenu.pid> selected="selected" </#if> > ${(m.code)!}-${(m.menuName)!}</option>
		                      </#list>
		                    </select>
		                  </div><!-- /.form-group -->
		            	 <div class="form-group">
			                <label for="uname">菜单名称</label>
			               	<input type="text" name="menuName" value="${(sysMenu.menuName)!}" class="form-control" placeholder="请输入菜单名称"  data-rule="菜单名称:required;">
			              </div>
			              <div class="form-group">
			                <label for="uname">编码</label>
			               	<input type="text" name="code" class="form-control" 
			               	value="${(sysMenu.code)!}"
			               	placeholder="请输入编码,如0501" data-rule="required;number" data-rule-number="[/^\d{4}$/, '请输入2位数字编码']">
			              </div>
			              <div class="form-group">
			                <label for="uname">菜单URL</label>
			               	<input type="text" name="url" class="form-control" value="${(sysMenu.url)!}" placeholder="请输入菜单URL"  data-rule="菜单URL:required;">
			              </div>
			              <div class="form-group">
			                <label for="uname">排序</label>
			               	<input type="text" name="sort" class="form-control" value="${(sysMenu.sort)!}" placeholder="请输入排序"  data-rule="排序:required;integer[+0]">
			              </div>  
			              <div class="form-group">
			                <label for="uname">图标 <i class="fa ${(sysMenu.icon)!}"></i></label>
			               	<input type="text" name="icon" class="form-control" value="${(sysMenu.icon)!}" placeholder="请输入图标,如:fa-user" >
			              </div>
		            </div><!-- /.box-body -->
		            <div class="box-footer">
		              <button type="submit" class="btn btn-success"><i class="fa fa-save"></i>  提 交</button>
		              <a  class="btn btn-default" href="/system/menu/list/1.html"><i class="fa fa-close"></i>  取消</a>
		            </div>
		          </form>
            </div>
          	</div>
          </div>
        </div><!-- /.box -->
      </div><!--/.col (left) -->
  </section><!-- /.content -->
</div><!-- /.content-wrapper -->
</@body>
<@footer>
</@footer>